package com.yh.correct.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yh.correct.dao.IEchartsMapper;
import com.yh.correct.service.IEchartsService;

/**
 * 作者:王登科
 * 创建时间:2017-03-15
 * 描述:报表业务实现
 */
@Service
public class EchartsServiceImpl implements IEchartsService {

	@Autowired
	private IEchartsMapper echartsMapper;
	/**
	 * 查询月份
	 */
	@Override
	public List<String> findMonth() {
		List<String> list = null;
		try {
			list = echartsMapper.getMonth();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

	/**
	 * 查询开展试点数量
	 */
	@Override
	public List<Integer> findPilotCount(){
		List<Integer> list = null;
		try {
			list = echartsMapper.getPilotCount();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

	/**
	 * 查询社会工作人员
	 */
	@Override
	public List<Integer> findSocialWorkers() {
		List<Integer> list = null;
		try {
			list = echartsMapper.getSocialWorkers();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

	/**
	 * 查询政府工作人员
	 */
	@Override
	public List<Integer> findGovernmentWorkers() {
		List<Integer> list = null;
		try {
			list = echartsMapper.getGovernmentWorkers();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

	/**
	 * 查询成功矫正人员
	 */
	@Override
	public List<Integer> findSuccessfulCorrection() {
		List<Integer> list = null;
		try {
			list = echartsMapper.getSuccessfulCorrection();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

	@Override
	public List<String> findProperties() {
		List<String> list = null;
		try {
			list = echartsMapper.getProperties();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}
	/**
	 *查询所有要统计的数量 
	 */
	@Override
	public List<Integer> findAllCount() {
		List<Integer> list = null;
		try {
			list = echartsMapper.getAllCount();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

	/**
	 * 查询统计字段
	 */
	@Override
	public List<String> findName() {
		List<String> list = null;
		try {
			list = echartsMapper.getName();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

}
